package com.bawei.module_home.model.api

import com.bawei.library_net.entity.ResponseEntity
import com.bawei.module_home.model.entity.CommentEntity
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * @Author : yaotianxue
 * @Time : On 2023/7/6 16:19
 * @Description : CommentApi
 */
interface CommentApi {
    //获得评论
    @GET("/comment/getCommentByUserId")
    suspend fun getComments(@Query("datatype") datatype:Int,@Query("itemid") itemid:String):ResponseEntity<MutableList<CommentEntity>>
    //发表评论
    @POST("/comment/publishComment")
    suspend fun publishComment(@Body entity:CommentEntity):ResponseEntity<CommentEntity>
}